from  flask_script import Manager
from web import app
from flask_migrate import Migrate, MigrateCommand
from exts import db
from models import *

manager = Manager(app)

# flask_migrate绑定app和db
migrate = Migrate(app, db)

# 将MigrateCommand命令添加到manager中
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
